<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">
    <h:form id="RoleFormEntity" prependId="false">
        <h:panelGrid columns="3" id="editModuleGroup" style="padding: 10px;">
            <h:panelGroup layout="block">
                <h:outputLabel style="color: red;" value="#{msg['asterisk']}"/>
                <h:outputText id="nameLabel" value="#{msg['module.name']}#{msg['colon']}"/>
            </h:panelGroup>
            <h:inputText id="name" value="#{moduleBean.module.moduleName}"/>
            <rich:message for="name"/>

            <h:panelGroup layout="block">
                <h:outputLabel style="color: red;" value="#{msg['asterisk']}"/>
                <h:outputText id="signLabel" value="#{msg['module.url']}#{msg['colon']}"/>
            </h:panelGroup>
            <h:inputText id="url" value="#{moduleBean.module.moduleUrl}"/>
            <rich:message for="url"/>

            <h:outputLabel id="sortLabel"
                           value="#{msg['table.sort']}#{msg['colon']}"/>
            <h:inputText id="sort" value="#{moduleBean.module.sort}">
                <f:validateLongRange minimum="1" maximum="100"/>
            </h:inputText>
            <rich:message for="sort"/>

            <h:outputLabel id="descLabel" value="#{msg['description']}#{msg['colon']}"/>
            <h:inputTextarea id="desc" rows="3" value="#{moduleBean.module.moduleDesc}"/>
            <rich:message for="desc"/>

        </h:panelGrid>
        <rich:tabPanel id="UserInfoTab">
            <rich:tab header="操作">

            </rich:tab>
        </rich:tabPanel>
        <h:panelGroup layout="block" style="text-align: center;" id="ActionForm">
            <a4j:commandButton value="#{msg['action.save']}" action="#{roleBean.save}"
                               render="ModuleList@body" execute="editModuleGroup"
                               oncomplete="if (#{facesContext.maximumSeverity==null}) {PawnPopup.hide('ModulePopupAddOrEdit')}"/>

            <a4j:commandButton value="#{msg['action.cancel']}" immediate="true" render="@none" execute="@none"
                               onclick="PawnPopup.hide('ModulePopupAddOrEdit');"/>

        </h:panelGroup>
    </h:form>
</ui:composition>